<?php
namespace Braintwister\Controller;
use Common\Controller\BraintwisterController;
use Think\Cache\Driver\Redis;
class TestController extends BraintwisterController {


    //数据抓取
    public function getquestion(){

       $data = M('newsong_questions')->select();

       foreach ($data as $val){

           $option = json_decode($val['option'],true);
          foreach ($option as $v1){
              if ($v1['id']==$val['aswer_id']&&$v1['title']!=$val['title']){
                  $arr[] = $val;
              }
          }
       }
       var_dump($arr);

    }



    public function getuserinfo(){



        $info = M('uid')->getField('uid',true);

        $count = M('uid')->count();

       echo $count;



    }

}
